<template>
  <div id="app">
      <keep-alive>
        <router-view v-if="$route.meta.keep==true"/>
      </keep-alive>
      <router-view v-if="!$route.meta.keep==true"/>

    <!-- 底部栏     判断那些页面显示 -->
   <van-tabbar v-if="$route.meta.isRoot" v-model="active" route  active-color='#03a9f4'>
      <van-tabbar-item replace to="/">
        <span>首页</span>
        <template #icon="props">
          <svg class="tt-icon" aria-hidden="true">
            <use xlink:href="#icon-shouye"></use>
          </svg>
        </template>
      </van-tabbar-item>

      <van-tabbar-item replace to="/publish">
        <span>发布</span>
        <template #icon="props">
          <svg class="tt-icon" aria-hidden="true">
            <use xlink:href="#icon-fabu"></use>
          </svg>
        </template>
      </van-tabbar-item>

      <van-tabbar-item replace to="/my">
        <span>我的</span>
        <template #icon="props">
          <svg class="tt-icon" aria-hidden="true">
            <use xlink:href="#icon-my"></use>
          </svg>
        </template>
      </van-tabbar-item>

    </van-tabbar>

  </div>
</template>

<script>
export default {
  name: 'WorkspaceJsonApp',

  data() {
    return {
      active:0
    };
  },

  mounted() {
    
  },

  methods: {
    
  },
};
</script>

<style lang="scss">
  #app{
    word-break: break-word;            
  }
  a {
    font-weight: bold;
    color: #2c3e50;
    
    &.router-link-exact-active {
      color: #42b983;
    }
  }
  .tt-icon {
    width: 1em;
    height: 1em;
    vertical-align: -0.15em;
    fill: currentColor;
    overflow: hidden;
  }
</style>
